<!--#begin schemacreate -->
<script type="text/javascript">
<!--
var ctrlf = null;
function onApprover(id, fn)
{
if(ctrlf != null)
	{
	ctrlf.value=fn;
	var nm = ctrlf.name.substring((ctrlf.name.indexOf('fn')) + 2);
	eval('document.forms.sccreate.fh'+nm+'.value = id');
	var td = document.getElementById('tdstatus');
	td.innerHTML =  fn;
	ctrlf = null;
	}
this.focus();
}

function v_all()
{
for (i = 0; i < document.forms.sccreate.elements.length; i++)
	{
	objCtrl = document.forms.sccreate.elements[i];
	if (objCtrl.name.substring(0,2) == 'fn') {
		objCtrl.disabled = false;
		objCtrl.className = 'cell';
		}
	}
}

function savef(t)
{
ctrlf = t;
v_all();
t.disabled = true;
t.className = 'selectedcell';
var td = document.getElementById('tdstatus');
td.innerHTML =  t.value;
}

var op = null;
function openPopup(url)
{
if( op == null || op.closed )
	op = this.open(url+'onApprover', 'babuserslist', 'width=550,height=550,status=no,resizable=yes,top=200,left=200,scrollbars=yes');
else
	op.focus();
}

function emptycell(findex, row)
{
var f = document.forms.sccreate;
eval('f.fn'+findex+'.value=\'\';');
eval('f.fh'+findex+'.value=\'\';');
eval('savef(f.fn'+findex+');');
}

function closepop()
	{
	if( op != null )
		op.close();
	}
//-->
</script>

<form name="sccreate" method="post" action="{ babPhpSelf }" onsubmit="v_all();closepop()">
<input type="hidden" name="tg" value="apprflow" />
<input type="hidden" name="idx" value="list" />
<input type="hidden" name="rows" value="{ rows }" />
<input type="hidden" name="cols" value="{ cols }" />
<input type="hidden" name="idsch" value="{ idsch }" />
<input type="hidden" name="type" value="{ type }" />
<input type="hidden" name="ocid" value="{ ocid }" />
<input type="hidden" name="add" value="{ what }" />
<table id="apprfloweditor" width="70%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr> 
<td class="BabLoginCadreBackground" align="center" valign="middle"> 
	<table class="BabLoginMenuBackground" width="100%" border="0" cellspacing="0" cellpadding="6">
	<tr> 
		<td colspan="3">{ schnametxt }:&nbsp;<input type="text" name="schname" size="30" value="{ schnameval }" /></td>
		<td colspan="3">{ schdesctxt }:&nbsp;<input type="text" name="schdesc" size="40" value="{ schdescval }" /></td>
	</tr>
	<!--#in getnextrow --> 
	<tr> 
		<td align="right">{ frow }</td>
		<!--#in getnextcol --> 
		<td nowrap="nowrap">
			<input type="text" name="fn{ findex }" size="15" value="{ fieldval }" class="cell" onfocus="savef(this)" />
			<a href="javascript:emptycell({ findex });" title="{ t_empty_cell }"><img border="0" src="{ babSkinPath }images/Puces/del.gif" alt="" /></a>
			<input type="hidden" name="fh{ findex }" value="{ fieldid }">
		</td>
		<!--#endin getnextcol --> 
		<td> 
			<select name="fs{ frow }">
				<option value="N"></option>
				<option value="Y" { allselected }>{ all }</option>
			</select>
		</td>
	</tr>
	<!--#endin getnextrow --> 
	<tr > 
		<td align="right">&nbsp;</td>
		<td colspan="6" id="tdstatus" class="BabLoginMenuBackground"></td>
	</tr>
	<tr> 
		<td>&nbsp;</td>
		<td><input type="checkbox" name="order" { ordchecked } value="Y" />&nbsp;{ order }</td>
		<td colspan="2" align="center"><input type="submit" name="addb" value="{ add }" /> &nbsp; <!--#if bdel --><input type="submit" name="delb" value="{ del }" /><!--#else bdel -->&nbsp;<!--#endif bdel --></td>
		<td colspan="2"><a href="javascript: openPopup('{ userslisturl }');">{ userslisttxt }</a>&nbsp;<!--#if ocname -->( { ocname } )<!--#endif ocname --></td>
	</tr>
	</table>
</td>
</tr>
</table>
</form>
<!--#end schemacreate -->

<!--#begin schemaslist -->
<table width="95%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr> 
<td class="BabLoginCadreBackground"> 
	<table width="100%" border="0" cellspacing="0" cellpadding="5">
	<tr class="BabSiteAdminTitleFontBackground"> 
		<td>{ schnametxt }</td>
		<td>{ schdesctxt }</td>
		<td>{ schtypetxt }</td>
		<td>{ orgnametxt }</td>
		<!--#if debugfa -->
		<td>&nbsp;</td>
		<!--#endif debugfa -->
	</tr>
	<!--#in getnext -->
	<!--#if altbg --><tr class="BabSiteAdminFontBackground"><!--#else altbg --><tr class="BabForumBackground1"><!--#endif altbg -->
		<td><a class="BabSiteAdminListLink" href="{ url }">{ urltxt }</a></td>
		<td>{ schdescval }&nbsp;</td>
		<td>{ schtypeval }</td>
		<td>{ orgnameval }</td>
		<!--#if debugfa -->
		<td><a class="BabSiteAdminListLink" href="{ testurl }">{ testurltxt }</a></td>
		<!--#endif debugfa -->
	</tr>
	<!--#endin getnext -->
	</table>
</td>
</tr>
</table>
<!--#end schemaslist -->

<!--#begin schematest -->
<form name="sctest" method="post" action="{ babPhpSelf }">
<input type="hidden" name="tg" value="apprflow">
<input type="hidden" name="idx" value="test">
<input type="hidden" name="idschi" value="{ idschi }">
<input type="hidden" name="idsch" value="{ idsch }">
<input type="hidden" name="test" value="testsc">
<input type="hidden" name="maxusers" value="{ count }">
<table width="95%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr> 
<td class="BabLoginCadreBackground"> 
<table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
<tr> 
<td colspan="3" class="BabSiteAdminFontBackground">&nbsp;{ formula }&nbsp;&nbsp;order={ order }&nbsp;&nbsp;Result={ resultat }</td>
</tr>
<tr> 
<td class="BabSiteAdminTitleFontBackground">&nbsp;</td>
<td class="BabSiteAdminTitleFontBackground">&nbsp;username</td>
<td class="BabSiteAdminTitleFontBackground">&nbsp;result</td>
</tr>
<!--#in getnext -->
<tr> 
<td class="BabSiteAdminFontBackground"><input type="checkbox" name="userids[]" value="{ userid }">
</td>
<td class="BabSiteAdminFontBackground">&nbsp;{ username }</td>
<td class="BabSiteAdminFontBackground">
<select name="us{ userid }">
<option value="Y">Yes</option>
<option value="N">No</option>
</select>
</td>
</tr>
<!--#endin getnext -->
<!--#if count "> 0" -->
<tr> 
<td colspan="3" class="BabLoginMenuBackground" align="center" nowrap valign="middle"><input type="submit" name="testsc" value="Update"></td>
</tr>
<!--#endif count -->
</table>
</td>
</tr>
</table>
</form>
<!--#end schematest -->


<!--#begin orgchartslist -->
<form method="post" action="{ babPhpSelf }">
<input type="hidden" name="tg" value="apprflow">
<input type="hidden" name="idx" value="newb">
<input type="hidden" name="type" value="{ satype }">
<table width="50%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr> 
<td class="BabLoginCadreBackground"> 
<table  width="100%" border="0" cellspacing="0" cellpadding="5" align="center" class="BabLoginMenuBackground">
<tr> 
<td align="center">{ messagetxt } </td>
</tr>
<tr>
<td align="center" nowrap valign="middle">
<select name="ocid">
<!--#in getnextorg -->
<option value="{ orgid }">{ orgname }</option>
<!--#endin getnextorg -->
</select>
</td>
</tr>
<tr> 
<td align="center"> 
<input type="submit" name="submit" value="{ donetxt } >>" />
<br>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
</form>
<!--#end orgchartslist -->

<!--#begin schemasinstanceslist -->
<form method="post" action="{ babPhpSelf }">
<input type="hidden" name="tg" value="apprflow">
<input type="hidden" name="updsch" value="updsch">
<table width="95%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr> 
<td class="BabLoginCadreBackground"> 
	<table width="100%" border="0" cellspacing="0" cellpadding="5">
	<tr class="BabSiteAdminTitleFontBackground"> 
		<td>{ instancetxt }</td>
		<td>{ schnametxt }</td>
		<td>{ schtypetxt }</td>
		<td>{ orgnametxt }</td>
		<td>&nbsp;</td>
	</tr>
	<!--#in getnext -->
	<!--#if altbg --><tr class="BabSiteAdminFontBackground"><!--#else altbg --><tr class="BabForumBackground1"><!--#endif altbg -->
		<td>{ urltxt }</td>
		<td>{ schdescval }</td>
		<td>{ schtypeval }</td>
		<td>{ orgnameval }</td>
		<td>
		<select name="newidsch[]">
          <option value=""></option>
		  <!--#in getnextschapp -->
		  <option value="{ said }-{ idschi }">{ saname }</option>
		  <!--#endin getnextschapp -->
		</select>
		</td>
	</tr>
	<!--#endin getnext -->
	</table>
</td>
</tr>
<tr> 
<td align="center"> 
<br>
<input type="submit" name="submit" value="{ updatetxt }" />
</td>
</tr>
</table>
</form>
<!--#end schemasinstanceslist -->
